<script setup lang="ts">
import { reactive, useSlots } from "vue";
const list = reactive([1, 2, 3, 4]);
const slots = useSlots();
</script>
<template>
  <div>
    <h1>子组件引用slot</h1>
    <p v-for="item in list" :key="item">
      子组件
      <slot name="header"></slot>
    </p>
  </div>
</template>
